import customDetailsTopbar from '@/components/globals/custom-details-topbar.vue'
import customTimer from '@/components/common/custom-timer.vue'
import customLoadmore from "@/components/common/custom-loadmore.vue";
import customPopCheckbox from "@/components/common/custom-pop-checkbox.vue";
import GetSelect from "@/assets/mixin/getSelect";
import customPlayer from '@/components/common/custom-player.vue'
import {deviceIndexIOT, deviceIOTInfo, historyMonitorLineChart, historyMonitorList} from '@/api/supervisory'

export default {
  components: {
    customDetailsTopbar,
    customTimer,
    customLoadmore,
    customPopCheckbox,
    customPlayer
  },
  mixins: [GetSelect],
  data() {
    return {
      params: this.$route.query,
      targetList: [], // 监测指标
      tableData: [], // 监测列表
      total: 0, // 总数
      pages: 0, // 页数
      superSearch: false, // 高级搜索
      infoData: '', // 基本信息
      // 监测详情参数
      descriptionsList: {
        "安全-传感器": [
          {
            label: "设备编号",
            value: "",
            fieldName: "deviceCode",
          },
          {
            label: "设备类型",
            value: "",
            fieldName: "deviceTypeName",
          },
          {
            label: "设备型号",
            value: "",
            fieldName: "modelNumber",
          },
          {
            label: "监控区域",
            value: "",
            fieldName: "monitorRegion",
          },
          {
            label: "监控区域风险等级",
            value: "",
            fieldName: "riskLevelName",
          },
          {
            label: "监控点",
            value: "",
            fieldName: "monitoringPoints",
          },
          {
            label: "企业名称",
            value: "",
            fieldName: "companyName",
          },
        ],
        "安全-视频监控":[{
          label: "设备编号",
          value: "",
          fieldName: "cameraCode",
        },
        {
          label: "企业名称",
          value: "",
          fieldName: "companyName",
        },
        {
          label: "监控区域",
          value: "",
          fieldName: "monitorRegion",
        },
        {
          label: "监控区域风险等级",
          value: "",
          fieldName: "riskLevel",
        },
        {
          label: "监控点",
          value: "",
          fieldName: "monitoringPoints",
        }],
        "环保-废水监控":[{
          label: "排口",
          value: "",
          fieldName: "cameraCode",
        },
        {
          label: "企业名称",
          value: "",
          fieldName: "companyName",
        },
        {
          label: "监测指标",
          value: "",
          fieldName: "monitorRegion",
        }],
        "环保-视频监控":[{
          label: "设备编号",
          value: "",
          fieldName: "cameraCode",
        },
        {
          label: "企业名称",
          value: "",
          fieldName: "companyName",
        },
        {
          label: "监控区域",
          value: "",
          fieldName: "monitorRegion",
        },
        {
          label: "监控区域风险等级",
          value: "",
          fieldName: "riskLevel",
        },
        {
          label: "监控点",
          value: "",
          fieldName: "monitoringPoints",
        },],
        "消防-视频监控":[{
          label: "设备编号",
          value: "",
          fieldName: "cameraCode",
        },
        {
          label: "企业名称",
          value: "",
          fieldName: "companyName",
        },
        {
          label: "监控区域",
          value: "",
          fieldName: "monitorRegion",
        },
        {
          label: "监控区域风险等级",
          value: "",
          fieldName: "riskLevel",
        },
        {
          label: "监控点",
          value: "",
          fieldName: "monitoringPoints",
        },]
      },
      pagePort:{
        '安全-传感器': {
          // 基本信息
          BasicInfoPort: deviceIOTInfo,
          // 指标数据
          TargetListPort: deviceIndexIOT,
          // chart数据
          LineChartPort: historyMonitorLineChart,
          // 监测列表
          ListPort: historyMonitorList
        }
      }

    };
  },
  computed: {
    getPort() {
      return this.pagePort[this.params.pageName] ?? false
    }
  },
};
